The Interface Kit Table of Contents | The Interface Kit Index |
Derived from: none
Declared in: be/interface/Point.h
Library: libbe.so
Allocation: Constructor or on the stack, typically the latter.
BPoint objects represent points on a two-dimensional coordinate grid. The object's coordinates are stored as public x and y data members. The BPoint class declares a global object, B_ORIGIN, that represents (0,0).
For an overview of coordinate geometry for the BeOS, see "The Coordinate Space" on page52.
float x
The coordinate value measured horizontally along the x-axis.
float y
The coordinate value measured vertically along the y-axis.
|
Creates a new BPoint object that corresponds to the point (x, y), or that's copied from point. If no coordinate values are assigned, the BPoint's location is indeterminate.
See also: Set(), the assignment operator
|
Ensures that the BPoint lies within rect. If it's already contained in the rectangle, the BPoint is unchanged; otherwise, it's moved to the rect's nearest edge.
See also: BRect::Contains()
|
Prints the BPoint's coordinates to standard output in the form:
"BPoint(x, y)"
|
Sets the BPoint's x and y coordinates.
See also: the BPoint constructor
|
Copies from's coordinate data into the left-side object.
|
== returns true if the two objects' point exactly coincide.
!= returns true if the two objects' points don't coincide.
|
+ creates and returns a new BPoint that adds the two operands together. The new object's x coordinate is the sum of the operands' x values; its y value is the sum of the operands' y values.
+= adds the operands together and stores the result in the left operand.
|
- creates and returns a new BPoint that subtracts the right operand from the left. The new object's x coordinate is the difference between the operands' x values; its y value is the difference between the operands' y values.
-= performs the subtraction and stores the result in the left operand.
BPoint object that represents (0,0).
The Interface Kit Table of Contents | The Interface Kit Index |
Copyright © 2000 Be, Inc. All rights reserved..